package com.crape.account.bo;

import java.util.List;

import com.crape.common.exceptions.BOException;
import com.crape.common.model.Account;
import com.crape.common.model.AccountInfo;

public interface IAccountBO {
	
    List<AccountInfo> searchAccounts(String searchValue, Integer startIndex, Integer pageSize) throws BOException;
    
    Long countSearchAccounts(String searchValue) throws BOException;

    void addAccount(Account account) throws BOException;

    Account validateOnceMore(String username) throws BOException;

    void updateAccountStatus(Long accountid, Integer status) throws BOException;

    void deleteAccountById(Long id) throws BOException;

    List<Account> listAccounts(Account account) throws BOException;

    List<Account> findAccounts(Account account) throws BOException;

    Account getAccountById(Long id) throws BOException;

    Account getAccountByEmail(String email) throws BOException;

    Account getAccountByUsername(String username) throws BOException;

    Long countAllDarrens() throws BOException;
    
    List<AccountInfo> getAllDarrens(Integer startIndex, Integer pageSize) throws BOException;

    List<AccountInfo> getAllDarrens(Long accountid, Integer startIndex, Integer pageSize) throws BOException;
    
    Long countDarrens(Long accountid, String email) throws BOException;
    
    List<AccountInfo> getDarrens(Long accountid, String email, Integer startIndex, Integer pageSize) throws BOException;

    void addDarrenAttention(Long fansid, Long accountid) throws BOException;

    void cancelDarrenAttention(Long fansid, Long accountid) throws BOException;

    Long statAccountAttention(Long accountid) throws BOException;
    
    Long statAccountArticle(Long accountid) throws BOException;

    Long statAccountQuestion(Long accountid) throws BOException;
    
    Long countAllAttentions(Long accountid) throws BOException;
    
    Long countAllArticles(Long accountid) throws BOException;
    
    Long countAllQuestions(Long accountid) throws BOException;

    List<AccountInfo> getAccountInfos(AccountInfo accountInfo) throws BOException;

    AccountInfo getAccountInfoById(Long accountid) throws BOException;

    AccountInfo getAccountInfoByEmail(String email) throws BOException;

    AccountInfo getAccountInfoByUsername(String username) throws BOException;

    void updateInfo(AccountInfo accountInfo) throws BOException;

    void updatePassword(Long accountid, String password) throws BOException;

    List<AccountInfo> getTop8Attentions(Long accountid) throws BOException;

    List<AccountInfo> getUserAttentionsByAccountid(Long accountid, Integer startIndex, Integer pageSize) throws BOException;

    Long countAllUserFans(Long accountid) throws BOException;

    List<AccountInfo> getUserFansByAccountid(Long accountid, Integer startIndex, Integer pageSize) throws BOException;
    
    void addAcctVisitor(Long visitorid, Long accountid) throws BOException;
    
    Long countAllUserVisitors(Long accountid) throws BOException;
    
    List<AccountInfo> getAllUserVisitors(Long accountid, Integer startIndex, Integer pageSize) throws BOException;
    
    List<AccountInfo> getTop16UserVisitors(Long accountid) throws BOException;
    
    List<AccountInfo> getTop16SubjectVisitors(Long subjectid) throws BOException;
    
    List<AccountInfo> getPagedAccountByFaq(int pagesize) throws BOException;
    
    List<AccountInfo> getPagedAccountByFaqRef(Long questionid, Integer startIndex, Integer pageSize) throws BOException;
    
    List<AccountInfo> getPagedAccountByAnswerRef(Long answerid, Integer type, Integer startIndex, Integer pageSize) throws BOException;
}
